package com.chinamobile.iot.mqtt.spi.impl;

import com.chinamobile.iot.mqtt.spi.processor.ClientEvent;
import com.chinamobile.iot.mqtt.spi.processor.CommandState;
import com.chinamobile.iot.mqtt.spi.processor.DataProcessor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.stereotype.Component;

/**
 * Created by szl on 2017/7/21.
 */
@Component
@ConditionalOnExpression("${mqtt.kafka} == false")
public class DiscardDataProcessor implements DataProcessor {

    @Override
    public boolean needToSaveEvent(String clientId, String mqttId) {
        return false;
    }

    @Override
    public boolean needToSaveData(String clientId, String mqttId, String topic, byte[] payload) {
        return false;
    }

    @Override
    public String getDataId(String clientId, String mqttId, String topic, byte[] payload) {
        return null;
    }

    @Override
    public Object createData(String clientId, String mqttId, String topic, byte[] payload) {
        return null;
    }

    @Override
    public Object createConnEvent(String clientId, String mqttId, ClientEvent event) {
        return null;
    }

    @Override
    public Object createCommandEvent(String clientId, String mqttId, String commandId, CommandState cmdStatus) {
        return null;
    }

    @Override
    public Object createDataEvent(String clientId, String mqttId, String topic, int direction) {
        return null;
    }
}
